import service from "@/utils/request";

/*
 *列表
 */
export function GetList(data){
    return service.request({
        method:'post',
        url:'/news/getList/',
        data
    })
}
/*
 *新增
 */
export function AddInfo(data){
    return service.request({
        method:'post',
        url:'/news/add/',
        data
    })
}
/*
 *编辑
 */

export function EditInfo(data){
    return service.request({
        method:'post',
        url:'/news/editInfo/',
        data
    })
}
/*
 *删除信息
 */
export function DeleteInfo(data){
    return service.request({
        method:'post',
        url:'/news/deleteInfo/',
        data
    })
}
// 编辑一级分类
export function EditCategory(data){
    return service.request({
        method:'post',
        url:'/news/editCategory/',
        data
    })
}

/*
一级分类添加 
 */
export function addFirstCategory(data) {
    return service.request({
        method: 'post',
        url: '/news/addFirstCategory/',
        data
    })
}
/*  
    获取分类信息
 */
export function GetCategory(){
    return service.request({
        method:'get',
        url: '/news/getCategory/',
        
    })
}
/*
 *删除分类
 */
export function DelCategory(data){
    return service.request({
        method:'post',
        url:'/news/deleteCategory/',
        data
    })
}
// 添加二级分类
export function AddChildrenCategory(data){
    return service.request({
        method:'post',
        url:'/news/addChildrenCategory/',
        data
    })
}

// 获取全部分类包含子集
export function GetCategoryAll(data){
    return service.request({
        method:'post',
        url:'/news/getCategoryAll/',
        data
    })
}